using System;
using System.Collections.Generic;
using System.Text;

namespace CodePlex.OpenSearch
{
    internal class Query
    {
        private string _role;
        private string _title;
        private int _totalResults;
        private string _searchTerms;
        private int _count;
        private int _startIndex;
        private int _startPage;
        private string _language;
        private string _inputEncoding;
        private string _outputEncoding;


        internal Query()
        {

        }

        internal Query(string role, string searchTerms)
        {
            _role = role;
            _searchTerms = searchTerms;
        }

        /// <summary>
        /// Contains a string identifying how the search client should interpret the search request defined by this Query element.
        /// Restrictions: See the role values specification for allowed role values. 
        /// Requirements: This attribute is required. 
        /// </summary>
        internal string Role
        {
            get
            {
                return _role;
            }
            set
            {
                _role = value;
            }
        }

        /// <summary>
        /// Contains a human-readable plain text string describing the search request.
        /// Restrictions: The value must contain 256 or fewer characters of plain text. The value must not contain HTML or other markup. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal string Title
        {
            get
            {
                return _title;
            }
            set
            {
                _title = value;
            }
        }

        /// <summary>
        /// Contains the expected number of results to be found if the search request were made.
        /// Restrictions: The value is a non-negative integer. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal int TotalResults
        {
            get
            {
                return _totalResults;
            }
            set
            {
                _totalResults = value;
            }
        }

        /// <summary>
        /// Contains the value representing the "searchTerms" as an OpenSearch 1.1 parameter.
        /// Restrictions: See the "searchTerms" parameter. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal string SearchTerms
        {
            get
            {
                return _searchTerms;
            }
            set
            {
                _searchTerms = value;
            }
        }

        /// <summary>
        /// Contains the value representing the "count" as a OpenSearch 1.1 parameter.
        /// Restrictions: See the "count" parameter. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal int Count
        {
            get
            {
                return _count;
            }
            set
            {
                _count = value;
            }
        }

        /// <summary>
        /// Contains the value representing the "startIndex" as an OpenSearch 1.1 parameter.
        /// Restrictions: See the "startIndex" parameter. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal int StartIndex
        {
            get
            {
                return _startIndex;
            }
            set
            {
                _startIndex = value;
            }
        }

        /// <summary>
        /// Contains the value representing the "startPage" as an OpenSearch 1.1 parameter.
        /// Restrictions: See the "startPage" parameter. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal int StartPage
        {
            get
            {
                return _startPage;
            }
            set
            {
                _startPage = value;
            }
        }

        /// <summary>
        /// Contains the value representing the "language" as an OpenSearch 1.1 parameter.
        /// Restrictions: See the "language" parameter. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal string Language
        {
            get
            {
                return _language;
            }
            set
            {
                _language = value;
            }
        }


        /// <summary>
        /// Contains the value representing the "inputEncoding" as an OpenSearch 1.1 parameter.
        /// Restrictions: See the "inputEncoding" parameter. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal string InputEncoding
        {
            get
            {
                return _inputEncoding;
            }
            set
            {
                _inputEncoding = value;
            }
        }

        /// <summary>
        /// Contains the value representing the "outputEncoding" as an OpenSearch 1.1 parameter.
        /// Restrictions: See the "outputEncoding" parameter. 
        /// Requirements: This attribute is optional. 
        /// </summary>
        internal string OutputEncoding
        {
            get
            {
                return _outputEncoding;
            }
            set
            {
                _outputEncoding = value;
            }
        }



    }
}
